/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.rs.manager.impl;

import java.util.Collection;
import java.util.List;

import com.xy.biz.rs.domain.req.GetNextSequenceRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xy.biz.rs.domain.bo.ManufactureApplyBO;
import com.xy.biz.rs.domain.query.ManufactureApplyQuery;
import com.xy.biz.rs.domain.converter.ManufactureApplyConverter;
import com.xy.biz.rs.manager.ManufactureApplyManager;
import com.xy.biz.rs.dao.ManufactureApplyDao;

/**
 *
 *
 * @author wwj
 * @date 2021-4-14
 */
@Service
public class ManufactureApplyManagerImpl implements ManufactureApplyManager {

	@Autowired
	private ManufactureApplyDao manufactureApplyDao;

	@Override
	public int saveManufactureApply(ManufactureApplyBO manufactureApplyBO) {
		return manufactureApplyDao.saveManufactureApply(ManufactureApplyConverter.toPO(manufactureApplyBO));
	}

	@Override
	public int saveAllManufactureApply(Collection<ManufactureApplyBO> collection) {
		return manufactureApplyDao.saveAllManufactureApply(ManufactureApplyConverter.toPO(collection));
	}

	@Override
	public int updateManufactureApply(ManufactureApplyBO manufactureApplyBO) {
		return manufactureApplyDao.updateManufactureApply(ManufactureApplyConverter.toPO(manufactureApplyBO));
	}

	@Override
	public int deleteManufactureApply(Long manufactureApplyId) {
		return manufactureApplyDao.deleteManufactureApply(manufactureApplyId);
	}

	@Override
	public ManufactureApplyBO getManufactureApply(Long manufactureApplyId) {
		return ManufactureApplyConverter.fromPO(manufactureApplyDao.getManufactureApply(manufactureApplyId));
	}

	@Override
	public List<ManufactureApplyBO> listManufactureApplyById(Collection<Long> collection) {
		return ManufactureApplyConverter.fromPO(manufactureApplyDao.listManufactureApplyById(collection));
	}

	@Override
	public List<ManufactureApplyBO> listManufactureApply(ManufactureApplyQuery query) {
		return ManufactureApplyConverter.fromPO(manufactureApplyDao.listManufactureApply(query));
	}

	@Override
	public int countManufactureApply(ManufactureApplyQuery query) {
		return manufactureApplyDao.countManufactureApply(query);
	}

	@Override
	public int getNextSequence(GetNextSequenceRequest request) {
		return manufactureApplyDao.getNextSequence(request);
	}

}
